<script type="text/javascript" src="__JS__/tooltips.js"></script>
<script src="__JS__/jquery-1.4.1.js" type="text/javascript"></script>
<script src="__JS__/formValidator.js" type="text/javascript"></script>
<script src="__JS__/formValidatorRegex.js" type="text/javascript"></script>
<link href="__CSS__/validator.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
	//关闭弹出页
	function ClosePage() {
		parent.tb_remove();
	}
	$(document).ready(function () {
		$.formValidator.initConfig({ formid: "form1", onerror: function (msg) { alert(msg) }, onsuccess: function () { return true; } });

		$("#txtTeamName").formValidator({ onshow: "请输入团队名称", onfocus: "团队名称注册完后不能修改！请选择一个闪亮，方便记忆的名字", oncorrect: "输入合法" }).inputValidator({ min: 1, empty: { leftempty: false, rightempty: false, emptyerror: "团队名称两边不能有空符号" }, onerror: "团队名称不能为空,请确认" });
		$("#txtTeamFetion").formValidator({ onshow: "请输入团队飞信号", onfocus: "飞信号将是组委会与团队联系的重要工具之一，一定要认真填写", oncorrect: "输入合法" }).inputValidator({ min: 1, empty: { leftempty: false, rightempty: false, emptyerror: "飞信号两边不能有空符号" }, onerror: "飞信号不能为空,请确认" }).regexValidator({ regexp: "^\s*[.0-9]{9}\s*$", onerror: "你输入的飞信号格式不正确" });
		$("#txtTeamDeclaration").formValidator({ empty: true, onshow: "请输入你的描述", onfocus: "不要超过200字哦，否则会显示不完整", oncorrect: "漂亮的团队宣言，祝你成功" }).inputValidator({ min: 1, max: 200, onerror: "你输入的描述长度不正确,请确认" });
	});
	function btnCancel_onclick() {
		ClosePage();
	}
	function nofind() {
		var img = event.srcElement;
		img.src = "__IMG__/Public/Uploads/default.gif";
	}
</script>
<style type="text/css">
	.inupt_text
	{
		-moz-border-radius: 3px 3px 3px 3px;
		border: 1px solid #CCCCCC;
		font-size: 14px;
		height: 24px;
		line-height: 24px;
		width: 300px;
	}
	.input-button, .input-submit
	{
		background-color: #005EAC;
		border-color: #B8D4E8 #124680 #124680 #B8D4E8;
		border-style: solid;
		border-width: 1px;
		color: #FFFFFF;
		cursor: pointer;
		font-size: 12px;
		padding: 4px 15px;
		text-align: center;
	}
	input.gray
	{
		background: none repeat scroll 0 0 #F0F0F0 !important;
		border-color: #FFFFFF #848484 #848484 #FFFFFF !important;
		border-style: solid;
		border-width: 1px;
		color: #333333 !important;
	}
	.legend
	{
		color: #666666;
		display: inline-block;
		font-weight: bolder;
		margin-top: 5px;
		cursor: default;
		line-height: 20px;
		height: 20px;
		letter-spacing: 0;
		margin-right: 5px;
		font-size: 12px;
		vertical-align: top;
	}
</style>
<if condition="$captain eq 1">
<form name="form1" method="post" action="__URL__/teamInfoMod" id="form1" enctype="multipart/form-data">
	<input type="hidden" name="id" value="{$Think.get.id}" />
    <table style="margin: 10px auto;">
        <tbody>
            <tr>
                <td>
                    <span class="legend">团队名称：</span>&nbsp;&nbsp;
					<input name="Name" type="text" value="{$team.Name}" maxlength="16" id="txtTeamName" class="inupt_text" style="width:280px;" disabled />
                </td>
            </tr>
            <tr>
                <td>
                    <span class="hastooltip legend" onmouseover="$('#iid').show()" onmouseout="$('#iid').hide()">
                        团队Logo：</span>
                    <input type="file" name="Logo" id="fuLogo" />
					<div id="iid" style="position:absolute;z-index:99999;display:none" width="120" height="120" onerror="nofind()" >
						<img src="__UPFILE__/Img/TeamFace/{$team.Logo}" width="120" height="120" />
					</div>
                </td>
            </tr>
            <tr>
                <td>
                    <span class="legend">团队飞信：</span>
					&nbsp;
					<input name="Fetion" style="width:280px" type="text" value="{$team.Fetion}" id="txtTeamFetion" class="inupt_text" />
                </td>
            </tr>
            <tr>
                <td>
                  <span class="legend" >团队宣言：</span>
				  <textarea name="Declaration" rows="5" cols="55" id="txtTeamDeclaration" style="resize:none;">{$team.Declaration}</textarea>
                </td>
            </tr>
            
            <tr style="display:none">
                <td>
                  <span class="legend">团队分工：</span>
                </td>
            </tr>
            <tr style="display:none">
                <td>
                    <textarea name="Division" rows="5" cols="55" id="txtDivision" style="resize:none">{$team.Division}</textarea>
                </td>
            </tr>
			<br />
            <tr>
                <td>
                    <input type="submit" name="btnSubmit" value="提交" id="btnSubmit" class="input-submit">
                    <input id="btnCancel" type="button" value="关闭" class="closeload input-submit">
                </td>
            </tr>
        </tbody>
    </table>
</form>
<else />
	<div>
		你不是队长，只能浏览该信息！
	</div>
	<table>
		<tbody>
			<tr>
				<td>
					<span class="legend">团队名称：</span>&nbsp;&nbsp;
					<input name="txtTeamName" type="text" value="{$team.Name}" maxlength="16" id="txtTeamName" class="inupt_text" style="width:280px;" disabled />
				</td>
				<td>
					
				</td>
			</tr>
			<tr>
				<td>
					<span class="hastooltip legend" style="float:left">
						团队Logo：</span>
					
					<div id="iid" style="float:left;margin-left:5px" width="120" height="120" onerror="nofind()" >
						<img src="__UPFILE__/Img/TeamFace/{$team.Logo}" width="120" height="120" />
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<span class="legend">团队飞信：</span>
					&nbsp;
					<input name="txtTeamFetion" type="text" value="{$team.Fetion}" id="txtTeamFetion" class="inupt_text" disabled />
				</td>
			</tr>
			<tr>
				<td>
				  <span class="legend">  团队宣言：</span>
				</td>
			</tr>
			<tr>
				<td>
					{$team.Declaration}
				</td>
			</tr>
			<tr style="display:none">
				<td>
				  <span class="legend"> 团队分工：</span>
				</td>
			</tr>
			<tr style="display:none">
				<td>
					{$team.Devision}
				</td>
			</tr>
			<br />
		</tbody>
	</table>
</if>